FROM golang:latest as build
ENV GO111MODULE=on
ADD . src/

RUN cd src && make agent

FROM gluenet/ingredients:0.0.1 as ingredients

FROM docker.io/alpine

COPY --from=build /go/src/build/bin/agent /app/agent
COPY --from=ingredients /ingredients/monitor/docker /root/.gluenet/monitor/docker
COPY --from=ingredients /ingredients/tools/docker-compose /usr/local/bin/docker-compose
    